package com.shinewind.search.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shinewind.pojo.entity.UserInfo;
import com.shinewind.search.mapper.IUserMapper;
import com.shinewind.search.service.IUserInfoService;
import org.springframework.stereotype.Service;

@Service
public class UserInfoServiceImpl extends ServiceImpl<IUserMapper, UserInfo> implements IUserInfoService {
    @Override
    public UserInfo getUserById(String uId) {
        UserInfo userInfo = this.lambdaQuery().eq(UserInfo::getUId,uId).one();
        return userInfo;
    }

    @Override
    public UserInfo getUserInfoByUsername(String username) {
        UserInfo userInfo = this.lambdaQuery().eq(UserInfo::getUserName,username).one();
        return userInfo;
    }
}
